Socket
Socket
Sign inDemoInstall

fast-levenshtein

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-levenshtein

Efficient implementation of Levenshtein algorithm with locale-specific collator support.


Version published
Weekly downloads
36M
decreased by-1.99%
Maintainers
1
Weekly downloads
 
Created

What is fast-levenshtein?

The fast-levenshtein npm package is a high-performance JavaScript implementation of the Levenshtein algorithm, which measures the difference between two sequences. It is commonly used to determine the similarity between two strings by calculating the minimum number of single-character edits (insertions, deletions, or substitutions) required to change one word into the other.

What are fast-levenshtein's main functionalities?

Calculate Levenshtein distance

This feature allows you to calculate the Levenshtein distance between two strings. The code sample demonstrates how to use the package to find the distance between 'back' and 'book', which is 2.

const levenshtein = require('fast-levenshtein');
const distance = levenshtein.get('back', 'book');
console.log(distance); // Output: 2

Other packages similar to fast-levenshtein

Keywords

FAQs

Package last updated on 22 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc